<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>	</title>
	<script type="text/javascript">
		arr = [453,56,56,356884,534,5,345];

		function getSum(TempArr) {
			sum = 0;
			for(var i in TempArr){
				sum +=TempArr[i];
			}
			return sum;
		}


		function getMax(TempArr) {
			max = TempArr[0];
			for(var i in TempArr){
				if(TempArr[i]>max){
					max = TempArr[i];
				}
			}
			return max;
		}

		function changeData(TempArr) {
			for(var i in TempArr){
				if(TempArr[i]%2==1){
					TempArr[i]=TempArr[i]*2;
				}
			}
			return TempArr;
		}

		res = changeData(arr);

		// document.write(res);


		arr = [56,345,345,34,5,345,345]

		function getSumDiff(TempArr) {
			sum = 0;
			sum1 = 0
			for(var i in TempArr){
				if(i%2==1){
					sum +=TempArr[i];
				}else{
					sum1 +=TempArr[i];
				}
			}
			return sum-sum1;
		}

		arr = [456,45,645,6]

		arr1 = [54645,456,45,6,64];


		function joinArr(aar1,arr2) {
			for( x in arr1){

			}
			for( i in arr2){
				arr1[Number(x)+1+Number(i)] =arr2[i];
			}
			return arr1;
		}

		res = joinArr(arr,arr1); 

		document.write(res);


	</script>
</head>
<body>
	
</body>
</html>